<template>
	<view>
		<view class="page__hd">
			<view class="page__title">共同战“疫”</view>
			<view class="page__desc">送上你的祝福</view>
		</view>

		<view class="weui-panel weui-panel_access" @tap='actionSend'>
			<view class="weui-panel__bd">
				<view class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
					<view class="weui-media-box__hd weui-media-box__hd_in-appmsg">
						<image class="weui-media-box__thumb" mode="aspectFill" src="../../static/Love_and_Thanks.jpg"></image>
					</view>
					<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
						<view class="weui-media-box__title">送祝福锦囊</view>
						<view class="weui-media-box__desc">制作一个祝福锦囊并寄给某个地方（或某个地点附近）的所有人</view>
					</view>
				</view>
			</view>
		</view>

		<view class="weui-panel weui-panel_access" @tap='actionRecieve'>
			<view class="weui-panel__bd">
				<view class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
					<view class="weui-media-box__hd weui-media-box__hd_in-appmsg">
						<image class="weui-media-box__thumb" mode="aspectFill" src="../../static/You_are_beautiful.jpg"></image>
					</view>
					<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
						<view class="weui-media-box__title">收祝福锦囊</view>
						<view class="weui-media-box__desc">查看寄到您所在地区（或您所在位置附近）的祝福锦囊</view>
					</view>
				</view>
			</view>
		</view>

		<!-- <view class="weui-panel weui-panel_access" @tap='actionRecieveByName'>
			<view class="weui-panel__bd">
				<view class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
					<view class="weui-media-box__hd weui-media-box__hd_in-appmsg">
						<image class="weui-media-box__thumb" mode="aspectFill" src="/images/You_are_beautiful.jpg"></image>
					</view>
					<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
						<view class="weui-media-box__title">锦囊集散转发中心</view>
						<view class="weui-media-box__desc">查看大家最近寄出的公开锦囊</view>
					</view>
				</view>
			</view>
		</view> -->

		<view class="weui-btn-area">
			<button type="default" @tap='myCollection'>我的收藏</button>
			<!--  -->
		</view>

		<!-- <view class="weui-cells__title">近期动态（近半年）</view>
		<view class="weui-cells weui-cells_after-title">
			<view wx:if="{{attendList.length>0}}">
				<view wx:for="{{attendList}}" v-for="item" :key="id">
					<view class="weui-cell">
						<view class="weui-cell__bd">{{item.expName}}
							<view class="weui-badge" style="margin-left:2px" wx:if="{{item.completed=='0'}}">未完成</view>
							<view style="margin-left:2px;color:#999;font-size:13px;display:inline-block" wx:else>{{item.end_t}}</view>
						</view>
						<view class="weui-cell__ft weui-cell__ft_in-access" data-attend-id="{{item.id}}" data-exp-id="{{item.expId}}" @tap='actionGo' wx:if="{{item.completed==0 || item.expId==1}}">{{item.completed=='1'?'详情':'继续'}}
						</view>
					</view>
				</view>
			</view>
			<view class="weui-loadmore weui-loadmore_line" v-else>
				<view class="weui-loadmore__tips weui-loadmore__tips_in-line">暂无</view>
			</view>
		</view> -->

		<view class="weui-footer" @tap="toggleVc">
			<view class="weui-footer__text">“关在府里无事干 翻墙捣瓦摔瓶罐”</view>
			<view class="weui-footer__text">闲来做个小功能 我为战疫做贡献</view>
			<view class="weui-footer__text">本程序基于思维科学 (Noetic Science) 理论制作，旨在帮助人们了解意识的能力和特点，并引导正面意念</view>
			<view class="weui-footer__text">关注微信【水结晶实验】公众号获得更多资讯</view>
			<view class="weui-footer__text">www.water-crystal.org © 2015-{{curDateObj.year}} </view>
		</view>
		<!-- <rock-shake title="摇一摇获得锦囊" @onrock="rockAndShake" @cancel=""></rock-shake> -->
		<!-- <random-stars></random-stars> -->
	</view>
</template>

<script module="curDateObj" lang="wxs">
	module.exports = {
		year: new Date().getFullYear()
	}
</script>,

<script>
	// import randomStars from '../../components/random-stars.vue'
	// import RockShake from '../../components/rock-shake.vue'
	import sys from '../../common/sys.js'
	export default {
		// components:{
		// 	RockShake,randomStars
		// },
		data() {
			return {
				lastClickTime: 0,
				count: 0
			}
		},
		methods: {
			actionSend: function() {
				sys.navigateTo('/pages/pray/send')
			},
			actionRecieve: function() {
				sys.navigateTo('/pages/pray/receive')
			},
			myCollection: function() {
				sys.navigateTo('/pages/pray/collection')
			},
			toggleVc() {
				const nowTime = Date.now()
				if (nowTime - this.lastClickTime < 3000) {
					this.count++;
				} else {
					this.count = 0;
				}
				this.lastClickTime = nowTime;
				// console.log(this.count)
				if (this.count >= 10) {
					let vconDom = document.getElementById('__vconsole');
					vconDom.style.display='block'
					// this.toggleClass(vconDom, 'show')
					this.count = 0;
				}
			},
			// rockAndShake(){}
		}
	}
</script>

<style>
	@import "../../static/weui.min.css";
	.show{
		display: block;
	}
	
</style>
